<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <title>网站信息</title>
    <link rel="stylesheet" href="<?=__A_CSS__?>pintuer.css">
    <link rel="stylesheet" href="<?=__A_CSS__?>admin.css">
    <script src="<?=__A_JS__?>jquery.js"></script>
    <script src="<?=__A_JS__?>pintuer.js"></script>
</head>

<body style="background-color:#f2f9fd;">

<!-- 后台首页 头部 start -->
<?php include 'tpl/header.html';?>
<!-- 后台首页 头部 top end -->

<!-- 后台首页 左侧导航栏 start -->
<?php include('tpl/left.html');?>
<!-- 后台首页 左侧导航栏 end -->

<!-- 后台首页 面包屑 start -->
<?php include('tpl/bread.html');?>
<!-- 后台首页 面包屑 end -->

<div class="admin">
  <div class="panel admin-panel">
    <div class="panel-head">
      <strong>
        <span class="icon-pencil-square-o"></span>
        网站信息
      </strong>
    </div>
    <div class="body-content">
      <form class="form-x" id="webset">
        <div class="form-group">
          <div class="label">
            <label>网站名字:</label>
          </div>
          <div class="field">
            <input type="text" class="input w50" name="webname" value="<?=$set['webname']?>" />
            <div class="tips"></div>
          </div>
        </div>
    

        <div class="form-group">
          <div class="label">
            <label>客服QQ:</label>
          </div>
          <div class="field">
            <input type="text" class="input w50" name="qq" value="<?=$set['qq']?>" />
          </div>
        </div>

        <div class="form-group">
          <div class="label">
            <label>前台注册:</label>
          </div>
          <div class="field" style="padding-top: 6px;">
             <input type="radio" name="is_reg" <?php if($set['is_reg'] == 1) {?> checked  <?php } ?> value="1">开放 
             &nbsp;&nbsp;
             <input type="radio" name="is_reg" <?php if($set['is_reg'] == 0) {?> checked  <?php } ?> value="0">关闭 
          </div>
        </div>


         <div class="form-group">
          <div class="label">
            <label>关闭网站:</label>
          </div>
          <div class="field" style="padding-top: 6px;">
             <input type="radio" name="is_g" <?php if($set['is_g'] == 1) {?> checked  <?php } ?> value="1">是 
             &nbsp;&nbsp;
             <input type="radio" name="is_g" <?php if($set['is_g'] == 0) {?> checked  <?php } ?> value="0">否 
          </div>
        </div>

        
        <div class="form-group">
          <div class="label">
            <label></label>
          </div>
          <div class="field">
            <button class="button bg-main icon-check-square-o" type="button" id="save">提交</button></div>
        </div>
      </form>
    </div>
  </div>
</div>
<script>

$(document).ready(function(){
 
      $("#save").click(function(){
           var data = $("#webset").serialize();
           $.ajax({
               url:'home',
               type:'POST',
               data:data,
               dataType:'json',
               success:function(res){
                      if (res.error == 1) {
                          alert(res.txt);
                      }else{
                          alert(res.txt);
                          window.location='home';
                      }
               }
           })  
      })
})


</script>
</body>
</html>